
package com.shangsi.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * 降级配置
 * @author dzd
 * @date 2021-12-18
 */
@RestController
@RequestMapping("downgrade")
public class SentinelDowngradeController {

    /**
     * 降级的配置
     * @return str
     */
    @RequestMapping("testD")
    public String testD() throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        System.out.println("testD "+System.currentTimeMillis());
        return "测试是否降级";
    }
}
